/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package normas;

/**
 *
 * @author marapao
 */
public class NormaPalpiteErrado extends Norma {

    public NormaPalpiteErrado() {
        super(0.08, 0.02, 0.05, 0.6);
    }

    public double calculaReputacaoPositiva(double valor) {
        double result =
                valor + valor * getDelta() * getPoder();

        if(result < 0)
            return 0;
        if(result > 1)
            return 1;

        return result;
    }

    public double calculaReputacaoNegativa(double valor) {
        double result =
                valor - valor * getDelta() * getPoder();
        
        if(result < 0)
            return 0;
        if(result > 1)
            return 1;
        
        return result;
    }
}
